/**
 * Sample React Native App
 * https://github.com/facebook/react-native
 *
 * @format
 * @flow
 */

import React, {Component} from 'react';
import {Platform, StyleSheet, Text, View,Image,
  ImageBackground,
  Dimensions,Button
} from 'react-native';
import { createStackNavigator, createAppContainer } from "react-navigation";
import TopBar from './src/bar/TopBar'
import Swiper from 'react-native-swiper';
import Home from './src/screen/home'
import NoticeList from './src/screen/notice/noticeList'
import NoticeDetail from './src/screen/notice/noticeDetail'
import ApplyList from './src/screen/apply/ApplyList'
import ApplyDetail from './src/screen/apply/ApplyDetail'
import MonitorInfo from './src/screen/monitor/MonitorInfo'
import MonitorDetail from './src/screen/monitor/MonitorDetail'
import StationInfo from './src/screen/station/StationInfo'
import StationList from './src/screen/station/StationList'
import StationDetail from './src/screen/station/StationDetail'
import ApplyAdd from './src/screen/apply/ApplyAdd'
import LeftButton from'./src/bar/LeftButton'
import ApplyAudit from './src/screen/apply/ApplyAudit'
//import CardStackStyleInterpolator from 'react-navigation/src/views/CardStackStyleInterpolator';
import DeviceStorage from './src/common/DeviceStorage'
var {height, width} = Dimensions.get('window');
class App extends Component{
  static navigationOptions = {
    headerTitle:<TopBar title='水电站'/>
    //title:'水电站',
  };
  constructor(props){
    super(props)
    
  }
  render(){
    //<Home {...this.props}/>
    return(
      <Home {...this.props}/>
    )
  }
}


const AppNavigator = createStackNavigator(
  {
    Home: App,
    noticeList:NoticeList,
    noticeDetail:NoticeDetail,
    applyList:ApplyList,
    applyDetail:ApplyDetail,
    monitorInfo:MonitorInfo,
    monitorDetail:MonitorDetail,
    stationInfo:StationInfo,
    stationList:StationList,
    stationDetail:StationDetail,
    applyAdd:ApplyAdd,
    applyAudit:ApplyAudit
    // transitionConfig:()=>({
    //   screenInterpolator: CardStackStyleInterpolator.forHorizontal,
    // })
  },
  {
    initialRouteName:'Home',
    defaultNavigationOptions:{
      headerStyle:{
        backgroundColor:'#33DCFF',
      },
      headerTitleStyle:{
        color:'white',
        fontSize:20,
      },
      //headerLeft:(<LeftButton/>)
    }
  }
  
);

export default createAppContainer(AppNavigator);